import { use } from "react";
import { common_utils } from "../utils/utils"


export var orderService={
    getPackages:function(username,ok){
        common_utils.request({
            url: "user/" + username + "/order",
            method: "GET",
            success: ok,
            data: null
          });

    },
    receivePackage:function(username,orderid,ok){

        common_utils.request({
            url: "user/" + username + "/order/"+orderid,
            method: "DELETE",
            success: ok,
            data: null
        })
    },
    confirmOrder:function(username,data,ok){
        common_utils.request({
            url: "user/" + username + "/order",
            method: "POST",
            success: ok,
            data: data
        })

    }



}